<script lang="ts" setup>
import MyBtnComp from './MyBtnComp.vue';
interface Prop {
    item: IFansOrFocusData
    text: string
    isSwitch: boolean
}
const props = defineProps<Prop>()

</script>

<template>
  <div>
    <van-cell>
        <template #title>
            <img class="avatar" :src="item.photo" />
            <div class="content">
                <p class="nickName">{{ item.name }}</p>
                <p class="desc">粉丝数：{{ item.fans_count }}</p>
            </div>
        </template>
        <template #value>
            <div class="btn">
                <MyBtnComp :text="text" :is-switch="isSwitch" />
            </div>
        </template>
    </van-cell>
  </div>
</template>

<style scoped>
    * {
        padding: 0;
        margin: 0;
    }
    .avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
    }
    .content {
        display: inline-block;
        margin-left: 15px;
    }
    .nickName {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .desc {
        color: #ccc;
        font-size: 14px;
    }
    .van-cell {
        height: 78px;
        display: flex;
        align-items: center;
        width: calc(100vw - 16px)!important;
        margin-left: 16px;
        border-bottom: 1px solid #eee;
    }
    .btn {
        padding-right: 16px;
    }
</style>